﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DbContext;
using SmartPlant.Model.Biz;
using SmartPlant.Model.DbContext;
using SmartPlant.Services.Interfaces;
using SmartPlant.WinCore;
namespace SmartPlant.Services
{
    public class TemperatureService : BaseService,   ITemperatureService

    {

        public async Task<Temperature> GetById(decimal Temperatureid)
        {
            string url = $"/api/Project/{GlobalObject.CurrentProject.ProjId}/temperature-api/{Temperatureid}";
            var res = await GetAsync<Temperature>(url);
            return res.data;
        }
        public async Task<bool> UpdateTemperatureAsync(decimal proId,  Temperature Temperatureid)
        {
            string uri = $"/api/Project/{proId}/temperature-api";
            var r = await PutBodyAsync<bool, Temperature>(uri, Temperatureid);
            return r.data;
        }

    }
}
